package com.bsoft.coordinatorlayouttest;

import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

/**
 * Created by 泅渡者
 * Created on 2017/10/17.
 */

public class FloatingactionButton extends AppCompatActivity {
    FloatingActionButton floatingActionButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.floatingactionbutton);

        floatingActionButton = (FloatingActionButton) findViewById(R.id.fb_menu);

        floatingActionButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(FloatingactionButton.this, "你好", Toast.LENGTH_SHORT).show();
            }
        });
    }
}
